package com.zb.controller;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zb.Service.SealorderService;
import com.zb.Service.TaskService;

@Scope("prototype")
@Component
@RequestMapping("/sealorder")
public class Sealordercontroller {
	@Resource
	private SealorderService ss;
	
	@Resource
	private TaskService ts;
	
	@RequestMapping(params = "op=save")
	public String toSave(int userid, int dicid, String ordertime,
			String content,int roleid,int deptid,ModelMap modelMap) {
		ss.saveSeal(userid, dicid, ordertime, content, roleid, deptid);
		int contentid = ss.getMaxId();
		ts.saveTask(userid, 4, contentid, roleid);	
		String str ="已提交";
		modelMap.put("msg", str);
		return "yongzhang";

	}
	
	

}
